#include<stdio.h>
#include<sys/types.h>
#include<unistd.h>
int main()
{
	pid_t pid;
	pid=getpid();
	pid_t ppid;
	pid_t pgid;
	pgid=getpgid(pid);
	ppid=getppid();
	printf("pid =%d\n",pid);
	printf("ppid =%d\n",ppid);
	printf("pgid =%d\n",pgid);

	return 0;
}
